﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/Site.Master" AutoEventWireup="true" CodeBehind="WFVisualizaStatus.aspx.cs" Inherits="s2b.ControleDesenvolvimentoProjetos.WFVisualizaStatus" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:SqlDataSource ID="DSSTATUS" runat="server" 
        ConnectionString="<%$ ConnectionStrings:CS_DB_Controle_Projeto %>" DeleteCommand="DELETE FROM STATUS

WHERE ID_STATUS = @ID_STATUS" InsertCommand="INSERT INTO STATUS (DESC_STATUS)
VALUES (@DESC_STATUS)" SelectCommand="select * from status" UpdateCommand="UPDATE STATUS SET
DESC_STATUS = @DESC_STATUS

WHERE ID_STATUS = @ID_STATUS">
        <DeleteParameters>
            <asp:Parameter Name="ID_STATUS" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="DESC_STATUS" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="DESC_STATUS" />
            <asp:Parameter Name="ID_STATUS" />
        </UpdateParameters>
    </asp:SqlDataSource>
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True"  Width="100%"
        AutoGenerateColumns="False" DataKeyNames="ID_STATUS" 
        DataSourceID="DSSTATUS" BackColor="White" BorderColor="#999999" 
        BorderStyle="Solid" BorderWidth="1px" CellPadding="3" ForeColor="Black" 
        GridLines="Vertical">
        <AlternatingRowStyle BackColor="#CCCCCC" />
        <Columns>
            <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
            <asp:BoundField DataField="ID_STATUS" HeaderText="Id status" 
                InsertVisible="False" ReadOnly="True" SortExpression="ID_STATUS" />
            <asp:BoundField DataField="DESC_STATUS" HeaderText="Descrição" 
                SortExpression="DESC_STATUS" />
                <asp:ButtonField ButtonType="Image" CommandName="Delete" ImageUrl="~/Util/Imagens/delete.png"
                Text="Remover"></asp:ButtonField>
                <asp:ButtonField ButtonType="Image" CommandName="Edit"  ImageUrl="~/Util/Imagens/edit.png"
                Text="Editar"></asp:ButtonField>
                <asp:ButtonField ButtonType="Image" CommandName="View"  ImageUrl="~/Util/Imagens/view.png"
                Text="Visualizar"></asp:ButtonField>
        </Columns>
        <FooterStyle BackColor="#CCCCCC" />
        <HeaderStyle BackColor="#000040" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#999999" ForeColor="#000040" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
        <SortedAscendingCellStyle BackColor="#F1F1F1" />
        <SortedAscendingHeaderStyle BackColor="#808080" />
        <SortedDescendingCellStyle BackColor="#CAC9C9" />
        <SortedDescendingHeaderStyle BackColor="#383838" />
    </asp:GridView>
</asp:Content>
